/***********************************************************************
 * Module:  Entrepot.java
 * Author:  Chris
 * Purpose: Defines the Class Entrepot
 ***********************************************************************/

package Modele;

import java.util.*;

/** @pdOid d6103c10-c5e3-4bf5-93e3-3d3a3a48a78b */
public class Entrepot {
   /** @pdRoleInfo migr=no name=Mission assc=association6 coll=java.util.Collection impl=java.util.HashSet mult=0..* */
   public ArrayList<Mission> mission;
   public ArrayList<Expedition> expedition;
   public int numeroEntrepot;
   
   public Mission planifier(Date date,int n,ArrayList<Expedition> e){
	   Mission m = new Mission( date, n, e);
	   mission.add(m);
	   return m;
   }
   
   public int getNumeroEntrepot() {
	return numeroEntrepot;
}

public void setNumeroEntrepot(int numeroEntrepot) {
	this.numeroEntrepot = numeroEntrepot;
}

/** @pdGenerated default getter */
   public java.util.Collection<Mission> getMission() {
      if (mission == null)
         mission = new ArrayList<Mission>();
      return mission;
   }
   
   /** @pdGenerated default iterator getter */
   public java.util.Iterator getIteratorMission() {
      if (mission == null)
         mission = new ArrayList<Mission>();
      return mission.iterator();
   }
   
   /** @pdGenerated default setter
     * @param newMission */
   public void setMission(java.util.Collection<Mission> newMission) {
      removeAllMission();
      for (java.util.Iterator iter = newMission.iterator(); iter.hasNext();)
         addMission((Mission)iter.next());
   }
   
   /** @pdGenerated default add
     * @param newMission */
   public void addMission(Mission newMission) {
      if (newMission == null)
         return;
      if (this.mission == null)
         this.mission = new ArrayList<Mission>();
      if (!this.mission.contains(newMission))
         this.mission.add(newMission);
   }
   
   /** @pdGenerated default remove
     * @param oldMission */
   public void removeMission(Mission oldMission) {
      if (oldMission == null)
         return;
      if (this.mission != null)
         if (this.mission.contains(oldMission))
            this.mission.remove(oldMission);
   }
   
   /** @pdGenerated default removeAll */
   public void removeAllMission() {
      if (mission != null)
         mission.clear();
   }

}